﻿using MediatR;
using Process.DAL;
using System.ComponentModel.DataAnnotations;

namespace Process.Api.Application.Command
{
    public class UpdateProcessCommand : IRequest<ApiResult<int>>
    {
        /// <summary>
        /// 工序ID
        /// </summary>
        [Required(ErrorMessage = "工序ID不能为空")]
        public int Id { get; set; }

        /// <summary>
        /// 工序编号
        /// </summary>
        [Required(ErrorMessage = "工序编号不能为空")]
        [StringLength(50, ErrorMessage = "工序编号长度不能超过50个字符")]
        public string ProcessCode { get; set; }

        /// <summary>
        /// 工序名称
        /// </summary>
        [Required(ErrorMessage = "工序名称不能为空")]
        [StringLength(100, ErrorMessage = "工序名称长度不能超过100个字符")]
        public string ProcessName { get; set; }

        /// <summary>
        /// 工序分类(外键)
        /// </summary>
        [Required(ErrorMessage = "工序分类不能为空")]
        public int ProcessType_Id { get; set; }

        /// <summary>
        /// 工序状态
        /// </summary>
        public bool ProcessStatus { get; set; }

        /// <summary>
        /// 工序负责人
        /// </summary>
        [StringLength(50, ErrorMessage = "负责人长度不能超过50个字符")]
        public string? Responsible { get; set; }

        /// <summary>
        /// 所属部门
        /// </summary>
        [StringLength(50, ErrorMessage = "部门长度不能超过50个字符")]
        public string? Department { get; set; }

        /// <summary>
        /// 工序备注
        /// </summary>
        [StringLength(500, ErrorMessage = "备注长度不能超过500个字符")]
        public string? Remark { get; set; }
    }
}
